package com.wjc.train.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wjc.train.business.entity.DailyTrainTicket;
import com.wjc.train.business.req.DailyTrainTicketQueryReq;
import com.wjc.train.business.resp.DailyTrainTicketQueryResp;
import org.apache.ibatis.annotations.Param;

import java.util.Date;

/**
 * <p>
 * 余票信息 Mapper 接口
 * </p>
 *
 * @author Guessed
 * @since 2023-08-11
 */
public interface DailyTrainTicketMapper extends BaseMapper<DailyTrainTicket> {

  IPage<DailyTrainTicketQueryResp> queryList(@Param("page") IPage<DailyTrainTicketQueryResp> page,
                                       @Param("dailytrainticketQueryReq") DailyTrainTicketQueryReq dailytrainticketQueryReq);

  void updateCountBySell(@Param("date") Date date,
                         @Param("trainCode")String trainCode,
                         @Param("seatTypeCode")Integer seatTypeCode,
                         @Param("minStartIndex") Integer minStartIndex,
                         @Param("maxStartIndex") Integer maxStartIndex,
                         @Param("minEndIndex") Integer minEndIndex,
                         @Param("maxEndIndex") Integer maxEndIndex);
}
